package org.suwenqian.audiovideosummary.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

@Data
@Configuration
@ConfigurationProperties(prefix = "llm")
public class LLMProperties {

    private String summaryEndpoint = "https://ai.qiniuapi.com/v1/text/summary";

    private String outlineEndpoint = "https://ai.qiniuapi.com/v1/text/outline";

    private Integer window = 4000; // 字数窗口

    private String defaultLanguage = "zh";  // 默认语言

    private Integer maxSummaryTokens = 512; // 摘要最大token数

    private Integer defaultChapterCount = 5; // 大纲生成的默认章节数

    public Integer getDefaultChapterCount() {
        return this.defaultChapterCount != null ? this.defaultChapterCount : 5;
    }

    public String getDefaultLanguage() {
        return this.defaultLanguage != null ? this.defaultLanguage : "zh";
    }

    public Integer getMaxSummaryTokens() {
        return this.maxSummaryTokens != null ? this.maxSummaryTokens : 512;
    }
}
